package com.project.slsx.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.project.slsx.R;
import com.project.slsx.bean.GoodsLossBean;
import com.project.slsx.utils.GlideUtils;

public class GoodsLossAdapter extends BaseQuickAdapter<GoodsLossBean.ResultBean, BaseViewHolder> {

    public GoodsLossAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder holder, GoodsLossBean.ResultBean item) {
        RequestOptions option = GlideUtils.getOption();
        ImageView thumb = holder.getView(R.id.iv_goods_loss_thumb);
        Glide.with(mContext).load(item.getThumb()).apply(option).into(thumb);
        holder.setText(R.id.tv_goods_loss_name, item.getTitle());
        holder.setText(R.id.tv_goods_loss_total, item.getTotal());
        holder.setText(R.id.tv_goods_loss_price, item.getPrice());

    }
}
